package com.xxx.redislock.service;

import java.util.concurrent.TimeUnit;

/**
 * redis分布式可重入锁：lock接口
 */
public interface Lock {

    boolean tryLock(long waitTime, long leaseTime, TimeUnit unit);

    void lock(long leaseTime, TimeUnit unit);

    void unlock();
}
